<?php
class image_1 extends Update_Model_Database_AbstractChange{

	protected $comment="Создание таблицы image";

	public function up(){
		$sql='CREATE TABLE IF NOT EXISTS image(
  					 id INT(11) NOT NULL AUTO_INCREMENT,
					  alt TEXT DEFAULT NULL,
					  img_url TEXT DEFAULT NULL,
					  thumb_url TEXT DEFAULT NULL,
					  cid INT(11) DEFAULT NULL,
					  type TEXT DEFAULT NULL,
					  path TEXT DEFAULT NULL,
					  width INT(11) DEFAULT NULL,
					  height INT(11) DEFAULT NULL,
					  crop TEXT DEFAULT NULL,
					  PRIMARY KEY (id)
				)
				CHARACTER SET utf8
				COLLATE utf8_general_ci;';
		$this->db->query($sql);
	}

	public function down(){
		$sql='DROP TABLE IF EXISTS image;';
		$this->db->query($sql);
	}

}